/*
 * Copyright (c) 2020, 2025, keyila All rights reserved.
 *
 */
package com.clp.exception;

import com.clp.bean.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author clp
 * @version 1.0
 */


@RestControllerAdvice
public class ExceptionAdaptController {

    @ExceptionHandler({RuntimeException.class})
    public Result runTimeException(RuntimeException exception){
        exception.printStackTrace();
        return Result.fail();
    }

    @ExceptionHandler({Exception.class})
    public Result Exception(Exception exception){
        exception.printStackTrace();
        return Result.fail();
    }

}
